class CrateShopAlliances < ActiveRecord::Migration
  def self.up
    create_table :shop_alliances do |t|
      t.string  :shop_name, :null => false, :limit => 200
      t.string  :shop_link, :null => false, :limit => 500
      t.string  :taoke_link, :limit => 500
      t.string  :logo, :limit => 200
      t.decimal :commission_rate, :precision => 2,  :scale => 2
      t.string  :tags,  :limit => 2000
      t.integer :sort_order, :default => 0
      t.integer :status, :default => 0, :default => 0
      t.integer :flag,  :default => 0,  :limit => 4
      t.text    :remarks
    end
  end

  def self.down
    remove_table  :shop_alliances
  end
end
